package com.tq.portal.market.model;

import com.tq.common.core.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author TqCoder
 * @since 2.0.0
 */
@Data
@Builder
@ApiModel("指数预测")
@EqualsAndHashCode(callSuper = true)
public class IndexPrediction extends BaseEntity {

    @ApiModelProperty("预测日期 T+1")
    private LocalDate predictDate;

    @ApiModelProperty("指数代码 如 HSTECH")
    private String indexCode;

    @ApiModelProperty("指数中文名")
    private String indexName;

    @ApiModelProperty("预测日收盘点位")
    private BigDecimal currentPrice;

    @ApiModelProperty("技术面文字结论")
    private String technicalAnalysis;

    @ApiModelProperty("消息面文字结论")
    private String newsAnalysis;

    @ApiModelProperty("短线支撑位")
    private Integer keySupport;

    @ApiModelProperty("短线压力位")
    private Integer keyResistance;

    @ApiModelProperty("短线趋势 ↑→↓")
    private String shortTermTrend;

    @ApiModelProperty("量能描述")
    private String volumeInterpretation;

    @ApiModelProperty("技术面上涨概率 %")
    private BigDecimal probUpTechnical;

    @ApiModelProperty("技术面下跌概率 %")
    private BigDecimal probDownTechnical;

    @ApiModelProperty("消息面上涨概率 %")
    private BigDecimal probUpNews;

    @ApiModelProperty("消息面下跌概率 %")
    private BigDecimal probDownNews;

    @ApiModelProperty("综合上涨概率 %")
    private BigDecimal probUpCombined;

    @ApiModelProperty("综合下跌概率 %")
    private BigDecimal probDownCombined;

    @ApiModelProperty("模型名称")
    private String modelName;

    @ApiModelProperty("北京时间生成时间")
    private LocalDateTime generatedTime;

    /* ===== 回测专用字段 ===== */

    @ApiModelProperty("T+1实际涨跌幅 %（收盘/收盘）")
    private BigDecimal actualReturnPct;

    @ApiModelProperty("是否命中 1命中 0未命中 NULL未回测")
    private Integer hitScore;

    @ApiModelProperty("打分脚本或人工")
    private String checkedBy;

    @ApiModelProperty("回测完成时间")
    private LocalDateTime checkedAt;

    @ApiModelProperty("备注（如黑天鹅）")
    private String note;
}